<?php 



$data = $_POST['username'];


var_dump(htmlspecialchars(addslashes($data)));



$str ="3453.4.pngs";


function Cjpg($path)
{
	$arr = explode('.',$path);
	$hz = end($arr);

	$jpgArr = ['png','gif','jpeg','jpg','bmp'];

	if(in_array($hz, $jpgArr)){
		return true;
	}else{
		return false;
	}
	
}
var_dump(Cjpg($str));










 ?>